package com.checkbox;

import java.util.ArrayList;
import java.util.List;

public class UiBeanItem<IDTYPE> {
  private List<UiBeanItem<IDTYPE>> children;
  private Object data;
  private String displayName;
  private IDTYPE id;
  private boolean isEnableSelected = true;
  private boolean isSelected;
  private UiBeanItem<IDTYPE> parent;

  public List<UiBeanItem<IDTYPE>> getChildren() {
    if (children == null) {
      children = new ArrayList<UiBeanItem<IDTYPE>>();
    }
    return children;
  }

  public Object getData() {
    return data;
  }

  public String getDisplayName() {
    return displayName;
  }

  public IDTYPE getId() {
    return id;
  }

  public UiBeanItem<IDTYPE> getParent() {
    return parent;
  }

  public boolean isIncludeKey() {
    return isEnableSelected;
  }

  public boolean isSelected() {
    return isSelected;
  }

  public void setChildren(List<UiBeanItem<IDTYPE>> children) {
    this.children = children;
  }

  public void setData(Object data) {
    this.data = data;
  }

  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

  public void setId(IDTYPE id) {
    this.id = id;
  }

  public void setIncludeKey(boolean isEnableSelected) {
    this.isEnableSelected = isEnableSelected;
  }

  public void setParent(UiBeanItem<IDTYPE> parent) {
    this.parent = parent;
  }

  public void setSelected(boolean isSelected) {
    this.isSelected = isSelected;
  }
}
